<template>
 <div class="pagination">
    <el-pagination
      @current-change="handleCurrentChange"
      :current-page.sync="currentPage"
      :page-size="pagenationData.pageSize"
      :total="pageTotal"
      background
      layout="prev, pager, next"
      prev-text="上一页"
      next-text="下一页"
    ></el-pagination>
  </div>
</template>
<script>
export default {
  name: "pagenation",
  data() {
    return {
      pagenationData: {
        pageSize: 20
      }
    };
  },
  props: { pageTotal: Number,currentPage:Number },
  methods: {
    // 上下分页 currentPage
    handleCurrentChange(page) {
      this.$emit("handleCurrentChange", page);
    }
  }
};
</script>